Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>ProbLog</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/ProbLog"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-ProbLog rootpage-ProbLog skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">ProbLog</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above summary">ProbLog</th></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Programmer" title="Programmer">Original author(s)</a></th><td class="infobox-data">DTAI research lab (KU Leuven)</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Initial release</th><td class="infobox-data">November&nbsp;11,&nbsp;2007<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">2007-11-11</span>)</span></td></tr><tr style="display: none;"><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">2.1
</div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Written in</th><td class="infobox-data"><a href="Python_(programming_language)" title="Python (programming language)">Python</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Operating_system" title="Operating system">Operating system</a></th><td class="infobox-data"><a href="Linux" title="Linux">Linux</a>, <a href="Mac_OS_X" class="mw-redirect" title="Mac OS X">Mac OS X</a>, <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_categories#Categorization_approaches" title="Software categories">Type</a></th><td class="infobox-data"><a href="Probabilistic_logic" title="Probabilistic logic">Probabilistic logic</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="Apache_License" title="Apache License"> Apache License, Version 2.0</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://dtai.cs.kuleuven.be/problog/">dtai<wbr>.cs<wbr>.kuleuven<wbr>.be<wbr>/problog<wbr>/</a></span></td></tr></tbody></table>
<p><b>ProbLog</b> is a <a href="Probabilistic_logic_programming" title="Probabilistic logic programming">probabilistic logic programming</a> language that extends <a href="Prolog" title="Prolog">Prolog</a> with probabilities.<sup id="cite_ref-ProbLogLinkDiscovery_1-0" class="reference"><a href="#cite_note-ProbLogLinkDiscovery-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-PLP_2-0" class="reference"><a href="#cite_note-PLP-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ProbLogConcepts_3-0" class="reference"><a href="#cite_note-ProbLogConcepts-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> It minimally extends <a href="Prolog" title="Prolog">Prolog</a> by adding the notion of a probabilistic fact, which combines the idea of <a href="Atomic_formula" title="Atomic formula">logical atoms</a> and <a href="Random_variable" title="Random variable">random variables</a>. Similarly to Prolog, ProbLog can query an <a href="Atomic_formula" title="Atomic formula">atom</a>. While Prolog returns the <a href="Truth_value" title="Truth value">truth value</a> of the queried <a href="Atomic_formula" title="Atomic formula">atom</a>, ProbLog returns the <a href="Probability" title="Probability">probability</a> of it being true.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Semantics">Semantics</h2></div>
<p>A probabilistic fact is a pair <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (p,a)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>,</mo>
<mi>a</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (p,a)}</annotation>
</semantics>
</math></span><img src="./5db544419bdd0558faa9ee8fedf1a3bc33fc0de7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.242ex; height:2.843ex;" alt="{\displaystyle (p,a)}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>a</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a}</annotation>
</semantics>
</math></span><img src="./ffd2487510aa438433a2579450ab2b3d557e5edc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.23ex; height:1.676ex;" alt="{\displaystyle a}" loading="lazy"></span> a <a href="Ground_expression#Ground_atom" title="Ground expression">ground atom</a> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p\in [0,1]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
<mo>∈<!-- ∈ --></mo>
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mn>1</mn>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p\in [0,1]}</annotation>
</semantics>
</math></span><img src="./33c3a52aa7b2d00227e85c641cca67e85583c43c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:8.752ex; height:2.843ex;" alt="{\displaystyle p\in [0,1]}" loading="lazy"></span> the probability of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>a</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a}</annotation>
</semantics>
</math></span><img src="./ffd2487510aa438433a2579450ab2b3d557e5edc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.23ex; height:1.676ex;" alt="{\displaystyle a}" loading="lazy"></span> being true. A rule is defined by an atom <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h}</annotation>
</semantics>
</math></span><img src="./b26be3e694314bc90c3215047e4a2010c6ee184a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.339ex; height:2.176ex;" alt="{\displaystyle h}" loading="lazy"></span>, called the head, and a finite set of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n}</annotation>
</semantics>
</math></span><img src="./a601995d55609f2d9f5e233e36fbe9ea26011b3b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}" loading="lazy"></span> <a href="Literal_(mathematical_logic)" title="Literal (mathematical logic)">literals</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{b_{1},b_{2},...,b_{n}\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo fence="false" stretchy="false">{</mo>
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>.</mo>
<mo>.</mo>
<mo>.</mo>
<mo>,</mo>
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \{b_{1},b_{2},...,b_{n}\}}</annotation>
</semantics>
</math></span><img src="./818c2b6b79c8f588a31b98d8dab8f1b1d0049fe8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.848ex; height:2.843ex;" alt="{\displaystyle \{b_{1},b_{2},...,b_{n}\}}" loading="lazy"></span>, called the body.
ProbLog programs consist of a set of probabilistic facts <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {F}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-caligraphic" mathvariant="script">F</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathcal {F}}}</annotation>
</semantics>
</math></span><img src="./205d4b91000d9dcf1a5bbabdfa6a8395fa60b676.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.927ex; height:2.176ex;" alt="{\displaystyle {\mathcal {F}}}" loading="lazy"></span> and a set of rules <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {R}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-caligraphic" mathvariant="script">R</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathcal {R}}}</annotation>
</semantics>
</math></span><img src="./74532dc308c806964b832df0d0d73352195c2f2f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.971ex; height:2.176ex;" alt="{\displaystyle {\mathcal {R}}}" loading="lazy"></span>. Using the distribution semantics, a probability distribution is defined over the two-valued <a href="Well-founded_semantics" title="Well-founded semantics">well-founded models</a> of the atoms in the program. The probability of a model is defined as <span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(M)=\prod _{l\in M}P(l)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo>∏<!-- ∏ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>l</mi>
<mo>∈<!-- ∈ --></mo>
<mi>M</mi>
</mrow>
</munder>
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>l</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P(M)=\prod _{l\in M}P(l)}</annotation>
</semantics>
</math></span></span> where the product runs over all the literals in the model <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>M</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle M}</annotation>
</semantics>
</math></span><img src="./f82cade9898ced02fdd08712e5f0c0151758a0dd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.442ex; height:2.176ex;" alt="{\displaystyle M}" loading="lazy"></span>. For a query atom <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q}</annotation>
</semantics>
</math></span><img src="./06809d64fa7c817ffc7e323f85997f783dbdf71d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.07ex; height:2.009ex;" alt="{\displaystyle q}" loading="lazy"></span> the distribution semantics defines a probability for the query
<span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(q)=\sum _{M\models q}P(M)=\sum _{M\models q}\prod _{l\in M}P(l)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>q</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>M</mi>
<mo>⊨<!-- ⊨ --></mo>
<mi>q</mi>
</mrow>
</munder>
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>M</mi>
<mo>⊨<!-- ⊨ --></mo>
<mi>q</mi>
</mrow>
</munder>
<munder>
<mo>∏<!-- ∏ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>l</mi>
<mo>∈<!-- ∈ --></mo>
<mi>M</mi>
</mrow>
</munder>
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>l</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P(q)=\sum _{M\models q}P(M)=\sum _{M\models q}\prod _{l\in M}P(l)}</annotation>
</semantics>
</math></span></span>
in which the sum runs over all the models where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q}</annotation>
</semantics>
</math></span><img src="./06809d64fa7c817ffc7e323f85997f783dbdf71d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.07ex; height:2.009ex;" alt="{\displaystyle q}" loading="lazy"></span> is true.
</p><p>ProbLog supports multiple tasks:
</p>
<ul><li>Probabilistic inference: calculate <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(q)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>q</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P(q)}</annotation>
</semantics>
</math></span><img src="./7076229c299e38dcffbc3bca2144e5f64fac9537.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.624ex; height:2.843ex;" alt="{\displaystyle P(q)}" loading="lazy"></span></li>
<li>Most probable explanation: calculate the most probable model probability <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \max _{M\models q}P(M)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munder>
<mo movablelimits="true" form="prefix">max</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>M</mi>
<mo>⊨<!-- ⊨ --></mo>
<mi>q</mi>
</mrow>
</munder>
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \max _{M\models q}P(M)}</annotation>
</semantics>
</math></span><img src="./045cceb7cf6801d633618d351a0759b87f8e328c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:10.71ex; height:4.509ex;" alt="{\displaystyle \max _{M\models q}P(M)}" loading="lazy"></span></li>
<li>Sampling: generate samples of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q}</annotation>
</semantics>
</math></span><img src="./06809d64fa7c817ffc7e323f85997f783dbdf71d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.07ex; height:2.009ex;" alt="{\displaystyle q}" loading="lazy"></span></li>
<li>Learning from interpretations: learn the probabilities of ProbLog programs from data</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Example">Example</h3></div>
<p>ProbLog can for example be used to calculate the probability of getting wet given the probabilities for rain and the probabilities that someone brings an umbrella as follows:
</p>
<div class="mw-highlight mw-highlight-lang-prolog mw-content-ltr" dir="ltr"><pre><span class="mf">0.4</span> <span class="s s-Atom">::</span> <span class="nf">rain</span><span class="p">(</span><span class="s s-Atom">weekday</span><span class="p">).</span>
<span class="mf">0.9</span> <span class="s s-Atom">::</span> <span class="nf">rain</span><span class="p">(</span><span class="s s-Atom">weekend</span><span class="p">).</span>
<span class="mf">0.8</span> <span class="s s-Atom">::</span> <span class="nf">umbrella_if_rainy</span><span class="p">(</span><span class="nv">Day</span><span class="p">).</span>
<span class="mf">0.2</span> <span class="s s-Atom">::</span> <span class="nf">umbrella_if_dry</span><span class="p">(</span><span class="nv">Day</span><span class="p">).</span>

<span class="nf">umbrella</span><span class="p">(</span><span class="nv">Day</span><span class="p">)</span> <span class="p">:-</span> <span class="nf">rain</span><span class="p">(</span><span class="nv">Day</span><span class="p">),</span> <span class="nf">umbrella_if_rainy</span><span class="p">(</span><span class="nv">Day</span><span class="p">).</span>
<span class="nf">umbrella</span><span class="p">(</span><span class="nv">Day</span><span class="p">)</span> <span class="p">:-</span> <span class="s s-Atom">\+</span><span class="nf">rain</span><span class="p">(</span><span class="nv">Day</span><span class="p">),</span> <span class="nf">umbrella_if_dry</span><span class="p">(</span><span class="nv">Day</span><span class="p">).</span>
<span class="nf">wet</span><span class="p">(</span><span class="nv">Day</span><span class="p">)</span> <span class="p">:-</span> <span class="nf">rain</span><span class="p">(</span><span class="nv">Day</span><span class="p">),</span> <span class="s s-Atom">\+</span><span class="nf">umbrella</span><span class="p">(</span><span class="nv">Day</span><span class="p">).</span>

<span class="nf">query</span><span class="p">(</span><span class="s s-Atom">\+</span><span class="nf">wet</span><span class="p">(</span><span class="s s-Atom">weekend</span><span class="p">)).</span>
</pre></div>
<p>The last rule before the query states that someone gets wet if it rains and no umbrella was brought. When ProbLog is asked to solve the "probabilistic inference" task, the query asks for the probability to stay dry on a weekend day. When solving the "most probable explanation" task, ProbLog will return the most likely reason for staying dry, i.e. because it is not raining or because the person has an umbrella.
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementations">Implementations</h2></div>
<p>The ProbLog language has been implemented as a YAP Prolog library (ProbLog 1).<sup id="cite_ref-ProbLog1_4-0" class="reference"><a href="#cite_note-ProbLog1-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> and as a stand-alone Python framework (ProbLog 2)<sup id="cite_ref-ProbLogHomepage_5-0" class="reference"><a href="#cite_note-ProbLogHomepage-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
The source code of ProbLog 2 is licensed under <a href="Apache_License" title="Apache License"> Apache License, Version 2.0</a> and available on <a href="GitHub" title="GitHub">GitHub</a>.<sup id="cite_ref-ProbLogRepository_6-0" class="reference"><a href="#cite_note-ProbLogRepository-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> The ProbLog language has also been implemented as part of the cplint probabilistic logic programming package for SWI-Prolog, YAP and XSB.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="ProbLog_variants">ProbLog variants</h2></div>
<p>ProbLog has been extended or used as inspiration for several different variants, including:
</p>
<ul><li><b>DeepProbLog</b> extends ProbLog by allowing the probability to be parametrized by a neural network.<sup id="cite_ref-DeepProbLog_8-0" class="reference"><a href="#cite_note-DeepProbLog-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup></li>
<li><b>DTProblog</b> extends ProbLog with <a href="Decision_theory" title="Decision theory">decision theory</a>. The utility of a strategy is defined as the expected reward for its execution in the presence of probabilistic effects.<sup id="cite_ref-DTProbLog_9-0" class="reference"><a href="#cite_note-DTProbLog-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup></li>
<li><b>DC-ProbLog</b> extends ProbLog with distributional facts, meaning that instead of probabilities, a logic atom has a corresponding continuous probability distribution instead.</li>
<li><b>aProbLog</b> generalizes ProbLog by allowing any <a href="Commutative_semiring" class="mw-redirect" title="Commutative semiring">commutative semiring</a> instead of just probabilities.<sup id="cite_ref-aProbLog_10-0" class="reference"><a href="#cite_note-aProbLog-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li>
<li><b>ProbFOIL</b>: given a set of ProbLog facts as a probabilistic relational database, ProbFOIL finds a set of probabilistic rules to predict the facts of one relation based on all other relations.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Related_languages">Related languages</h2></div>
<ul><li>PRISM: Programming in statistical modeling<sup id="cite_ref-PRISM_11-0" class="reference"><a href="#cite_note-PRISM-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup></li>
<li>ICL: Independent Choice Logic<sup id="cite_ref-ICL_12-0" class="reference"><a href="#cite_note-ICL-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup></li>
<li>CP-Logic: Language of causal probabilistic events<sup id="cite_ref-CP-Logic_13-0" class="reference"><a href="#cite_note-CP-Logic-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup></li>
<li>LPAD: Logic programs with annotated disjunctions<sup id="cite_ref-PITA_14-0" class="reference"><a href="#cite_note-PITA-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></li>
<li>Distributional clauses: A probabilistic logic language for hybrid relational domains<sup id="cite_ref-DC_15-0" class="reference"><a href="#cite_note-DC-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<ul><li>ProbLog homepage<sup id="cite_ref-ProbLogHomepage_5-1" class="reference"><a href="#cite_note-ProbLogHomepage-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></li>
<li>ProbLog docs<sup id="cite_ref-ProbLogDocs_16-0" class="reference"><a href="#cite_note-ProbLogDocs-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup></li>
<li>ProbLog repository<sup id="cite_ref-ProbLogRepository_6-1" class="reference"><a href="#cite_note-ProbLogRepository-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-ProbLogLinkDiscovery-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-ProbLogLinkDiscovery_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFDe_RaedtKimmigToivonen2007" class="citation conference cs1">De Raedt, Luc; Kimmig, Angelika; Toivonen, Hannu (November 2007). <i>ProbLog: A Probabilistic Prolog and Its Application in Link Discovery</i>. IJCAI. Vol.&nbsp;7.</cite></span>
</li>
<li id="cite_note-PLP-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-PLP_2-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFFierensVan_den_BroeckBruynoogheDe_Raedt2012" class="citation conference cs1">Fierens, D; Van den Broeck, G.; Bruynooghe, M.; De Raedt, L. (2012). <i>Constraints for probabilistic logic programming</i>. Proceedings of the NIPS Probabilistic Programming Workshop. pp.&nbsp;<span class="nowrap">1–</span>4.</cite></span>
</li>
<li id="cite_note-ProbLogConcepts-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-ProbLogConcepts_3-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFDe_RaedtKimmig2015" class="citation journal cs1">De Raedt, Luc; Kimmig, Angelika (2015). <a rel="nofollow" class="external text" href="https://doi.org/10.1007%2Fs10994-015-5494-z">"Probabilistic (logic) programming concepts"</a>. <i>Machine Learning</i>. <b>100</b> (1): <span class="nowrap">5–</span>47. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2Fs10994-015-5494-z">10.1007/s10994-015-5494-z</a></span>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:3166992">3166992</a>.</cite></span>
</li>
<li id="cite_note-ProbLog1-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-ProbLog1_4-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dtai.cs.kuleuven.be/problog/problog1/installation.html">"ProbLog1"</a>. <i>dtai.cs.kuleuven.be</i>.</cite></span>
</li>
<li id="cite_note-ProbLogHomepage-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-ProbLogHomepage_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ProbLogHomepage_5-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://dtai.cs.kuleuven.be/problog">"ProbLog: Probabilistic Programming"</a>. <i>dtai.cs.kuleuven.be</i>.</cite></span>
</li>
<li id="cite_note-ProbLogRepository-6"><span class="mw-cite-backlink">^ <a href="#cite_ref-ProbLogRepository_6-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ProbLogRepository_6-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/ML-KULeuven/problog">"ProbLog GitHub repository"</a>. <i>github.com</i>. 12 October 2022.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ai.unife.it/cplint/">"cplint – AI@UNIFE"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-11-13</span></span>.</cite></span>
</li>
<li id="cite_note-DeepProbLog-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-DeepProbLog_8-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFManhaeveDumancicKimmigDemeester2018" class="citation conference cs1">Manhaeve, Robin; Dumancic, Sebastijan; Kimmig, Angelika; Demeester, Thomas; De Raedt, Luc (2018). <i>DeepProbLog: Neural Probabilistic Logic Programming</i>. NeurIPS 2018, Thirty-second Conference on Neural Information Processing Systems. pp.&nbsp;<span class="nowrap">3753–</span>3760.</cite></span>
</li>
<li id="cite_note-DTProbLog-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-DTProbLog_9-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFVan_den_BroeckThonVan_OtterloDe_Raedt2010" class="citation conference cs1">Van den Broeck, Guy; Thon, Ingo; Van Otterlo, Martijn; De Raedt, Luc (2010). "DTProbLog: A decision-theoretic probabilistic Prolog". <i>Proceedings of the AAAI Conference on Artificial Intelligence</i>. Vol.&nbsp;24.</cite></span>
</li>
<li id="cite_note-aProbLog-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-aProbLog_10-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKimmigVan_den_BroeckDe_Raedt2011" class="citation conference cs1">Kimmig, A.; Van den Broeck, G.; De Raedt, L. (2011). <i>An algebraic Prolog for reasoning about possible worlds</i>. Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence. pp.&nbsp;<span class="nowrap">209–</span>214.</cite></span>
</li>
<li id="cite_note-PRISM-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-PRISM_11-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://rjida.meijo-u.ac.jp/prism/">"PRISM: PRogramming In Statistical Modeling"</a>. <i>rjida.meijo-u.ac.jp</i>.</cite></span>
</li>
<li id="cite_note-ICL-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-ICL_12-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPoole2008" class="citation book cs1">Poole, David (2008). "The independent choice logic and beyond". In Luc Raedt; Paolo Frasconi; Kristian Kersting; Stephen Muggleton (eds.). <i>Probabilistic Inductive Logic Programming</i>. Lecture Notes in Computer Science. Vol.&nbsp;4911. Springer. pp.&nbsp;<span class="nowrap">222–</span>243. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-540-78652-8_8">10.1007/978-3-540-78652-8_8</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-78651-1</bdi>.</cite></span>
</li>
<li id="cite_note-CP-Logic-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-CP-Logic_13-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFVennekensDeneckerBruynooghe2009" class="citation conference cs1">Vennekens, Joost; Denecker, Marc; Bruynooghe, Maurice (2009). <i>CP-logic: A language of causal probabilistic events and its relation to logic programming</i>. Theory and practice of logic programming. Vol.&nbsp;9. pp.&nbsp;<span class="nowrap">245–</span>308. <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/0904.1672">0904.1672</a></span>.</cite></span>
</li>
<li id="cite_note-PITA-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-PITA_14-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ml.unife.it/pita/">"PITA: Probabilistic Inference with Tabling and Answer subsumption"</a>. <i>ml.unife.it</i>.</cite></span>
</li>
<li id="cite_note-DC-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-DC_15-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dtai.cs.kuleuven.be/ml/systems/DC/">"Distributional Clauses"</a>. <i>dtai.cs.kuleuven.be</i>.</cite></span>
</li>
<li id="cite_note-ProbLogDocs-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-ProbLogDocs_16-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://problog.readthedocs.io/en/latest/">"ProbLog: ProbLog 2.1 documentation"</a>. <i>problog.readthedocs.io</i>.</cite></span>
</li>
</ol></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2024-06-28" href="https://en.wikipedia.org/wiki/?title=ProbLog&amp;oldid=1231437938">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>